package com.zlq.cn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author zhoucl
 * @since 2020-12-29
 */
@Data
@Accessors(chain = true)
@TableName("z_bind_user_location")
public class BindUserLocation {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    @NotNull(message = "绑定id不能为空")
    private Integer bindUserId;

    @NotNull(message = "绑定好友用户ID不能为空")
    private Integer toUserId;

    @NotNull(message = "标签不能为空")
    private String tag;

    @NotNull(message = "标题不能为空")
    private String title;

    @NotNull(message = "纬度不能为空")
    private String address;

    @NotNull(message = "经度不能为空")
    private Double longitude;

    @NotNull(message = "地址不能为空")
    private Double latitude;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    // 离开是否已提醒
    @TableField(exist = false)
    private boolean leaveRemind = true;

    // 到达是否已提醒
    @TableField(exist = false)
    private boolean arrivRemind = false;
}
